
/**
 * Use xmlhttpreq to get the raw rss xml
 */
function getRSS(vid, hid, url)
{
	var xhr;
	var rssfeed = url;
	
	//call the right constructor for the browser being used
	if (window.ActiveXObject) 
		xhr = new ActiveXObject("Microsoft.XMLHTTP");
	else 
		if (window.XMLHttpRequest) 
			xhr = new XMLHttpRequest();
		else 
			alert("AJAX request not supported");
	
	//prepare the xmlhttprequest object
	xhr.open("GET", rssfeed, true);
	xhr.setRequestHeader("Cache-Control", "no-cache");
	xhr.setRequestHeader("Pragma", "no-cache");
	xhr.onreadystatechange = function(){
		if (xhr.readyState == 4) {
			if (xhr.status == 200) {
				if (xhr.responseText != null) {
					processRSS(xhr.responseXML, vid, hid);
				}
				else {
					mwl.insertHTML('#verview', 'Failed to receive RSS file from the server - file not found.');
					alert("Failed to receive RSS file from the server - file not found.");
					return false;
				}
			}
			else {
				mwl.insertHTML('#verview', 'There was an error with feed url/data');
				alert("Error code " + xhr.status + " received: " + xhr.statusText);
			}
		}
	}
	
	// Loading indicator
	mwl.insertHTML('#verview', 'Loading...<br/><img src="img/ajax-loader.gif" alt="Loading"/>');

	//send the request
	xhr.send(null);

}